1. Field of the Invention
The present invention generally relates to data compression, and more particularly to data compression for a single bit-plane.
2. Description of the Prior Art
Modern electronic devices, such as television sets, DVD players, or even computers, display additional information superimposed on a screen picture, which is commonly known as on-screen display (OSD). The OSD provides users more function or control, such as channel or volume adjustment, over the electronic devices. The OSD is displayed either in character mode or graphic mode. The OSD data in either mode are usually stored in a memory device, such as read only memory (ROM). As each OSD is stored as an image, the required amount of the memory device is large and costly.
Image compression is therefore employed to reduce redundancy of the OSD data in order to be able to store the OSD data in an efficient way. Run-length coding is usually utilized to perform the compression, which takes advantage of the fact that nearby pixels in the image are probably have the same brightness. Consequently, the run-length code is made of a brightness value, followed by the number (or run-length) of pixels that have the same brightness value. For example, if twelve consecutive pixels have the same brightness value of 150, these pixels could be then encoded as two-byte code (150, 12). The compression ration is thus 6 (=12 bytes/2 bytes). Even though the run-length coding is beneficial to most images, this coding technique, however, tends to have data explosion that does not compress but expand the image data under some circumstances such as coding a small image like the OSD.
For the foregoing reasons, a need has arisen to propose a technique for effectively compressing some specific images, particularly the OSD images.